CREATE EXTERNAL TABLE `jms_tmp.dm_oper_center_ship_detail_dt`(
  `send_waybill_no` string COMMENT '发件运单号',
  `send_shipment_no` string COMMENT '发件任务号',
  `send_next_station_code` string COMMENT '发件下一站',
  `shipment_no` string COMMENT '经停点发件任务号',
  `shipment_state` string COMMENT '任务状态',
  `sort_num` string COMMENT '顺序',
  `center_code` string COMMENT '站点编码',
  `center_name` string COMMENT '站点名称',
  `arrival_waybill_no` string COMMENT '到件运单号',
  `arrival_shipment_no` string COMMENT '到件任务号',
  `planned_arrival_time` string COMMENT '计划到达日期+时间',
  `planned_departure_time` string COMMENT '计划离开日期+时间',
  `actual_arrival_time` string COMMENT '实际到达时间',
  `actual_departure_time` string COMMENT '实际离开时间',
  `unlock_time` string COMMENT '解锁时间',
  `zt_car` string COMMENT '在途车辆(任务号)',
  `zt_piece` string COMMENT '在途件量(运单号)',
  `yx_piece` string COMMENT '已卸件量(任务号)',
  `all_piece` string COMMENT '全部件量(运单号)',
  `create_date` string COMMENT '创建日期',
  `stat_time` string COMMENT '统计时间')
COMMENT '中心进出港车辆报表明细-小时更新'
PARTITIONED BY (
  `dt` string COMMENT '分区日期')
STORED AS PARQUET
    LOCATION '/dw/hive/jms_tmp.db/external/dm_oper_center_ship_detail_dt'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );


CREATE EXTERNAL TABLE `jms_dm.dm_oper_center_ship_summary_dt`(
  `stat_time` string COMMENT '统计时间',
  `center_code` string COMMENT '中心编码',
  `center_name` string COMMENT '中心名称',
  `ydwx_car_cnt` bigint COMMENT '已到未卸车辆',
  `ydwx_piece_cnt` bigint COMMENT '已到未卸件辆',
  `yx_car_cnt` bigint COMMENT '已卸车辆',
  `yx_piece_cnt` bigint COMMENT '已卸件辆',
  `zt_car_cnt` bigint COMMENT '在途车辆',
  `zt_piece_cnt` bigint COMMENT '在途件辆')
COMMENT '操作平台-转运中心车辆报表'
PARTITIONED BY (
  `dt` string COMMENT '分区日期')
STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_oper_center_ship_summary_dt'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );